package com.foreknow.elmboot.mapper;
import com.foreknow.elmboot.po.Business;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface BusinessMapper {
    /**
     * 根据orderTypeId查询信息
     * @param orderTypeId
     * @return
     * @throws Exception
     */
    @Select("select * from business where orderTypeId=#{orderTypeId} order by businessId")
    public List<Business> listBusinessByTypeId(Integer orderTypeId)throws Exception;

    /**
     * 根据businessId查询某一个商品信息
     * @param businessId
     * @return
     * @throws Exception
     */
    @Select("select * from business where businessId=#{businessId}")
    public Business getBusinessById(Integer businessId)throws Exception;
}
